<?php
$app_config = require(dirname(__FILE__) . '/../config/boot.php');
require $app_config['QEEPHP_DIR'] . '/library/q.php';
require $app_config['APP_DIR'] . '/myapp.php';
$ret = MyApp::instance($app_config);
$username = isset($_REQUEST['UserID']) ? $_REQUEST['UserID'] : '';
$password = isset($_REQUEST['UserPWD']) ? $_REQUEST['UserPWD'] : '';
//echo $password;exit;
$user = User::find('name=? and password=?',trim($username),md5(trim($password)))->asArray()->getOne();
if ($user['id'])
{
	 session_start();
	 $_SESSION['UGType'] = 1;
	 $_SESSION['attrID'] = $user['name'];
	 echo 1;exit;
}
else
{
	echo "not deny";exit;
}